package cn.iocoder.yudao.module.robot.dal.mysql.callrecordbills;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.robot.dal.dataobject.callrecordbills.CallRecordBillsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.robot.controller.admin.callrecordbills.vo.*;

/**
 * 机器人通话详情 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface CallRecordBillsMapper extends BaseMapperX<CallRecordBillsDO> {

    default PageResult<CallRecordBillsDO> selectPage(CallRecordBillsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CallRecordBillsDO>()
                .eqIfPresent(CallRecordBillsDO::getCallRecordId, reqVO.getCallRecordId())
                .eqIfPresent(CallRecordBillsDO::getMessage, reqVO.getMessage())
                .eqIfPresent(CallRecordBillsDO::getPath, reqVO.getPath())
                .eqIfPresent(CallRecordBillsDO::getRole, reqVO.getRole())
                .eqIfPresent(CallRecordBillsDO::getHitKeyword, reqVO.getHitKeyword())
                .betweenIfPresent(CallRecordBillsDO::getDialTime, reqVO.getDialTime())
                .betweenIfPresent(CallRecordBillsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CallRecordBillsDO::getId));
    }

}